package com.lengxf.redis.service.listener;

import org.springframework.data.redis.connection.MessageListener;
import org.springframework.data.redis.listener.PatternTopic;
import org.springframework.data.redis.listener.Topic;

/**
 * redis监听接口
 *
 * @Author Lengxf
 */
public interface RedisListener extends MessageListener {

    default Topic getTopic() {
        //默认监听所有key的set操作
        return new PatternTopic("__keyevent@*__:set");
    }

}
